import { useLocale, useOptions } from "@/hooks"

import GameListSelect from "../../common/gameListSelect"

const PayTypeSelector = ({ modalKey, name, ...props }: { modalKey?: string; name?: string; props?: object }) => {
	const { formatMessage } = useLocale()
	const options = useOptions({ modal: modalKey ?? "depositPaymentType", func: formatMessage })

	return (
		<GameListSelect
			name={name ?? "payType"}
			labelId="funds.pay_type"
			placeholderId="common.select_all"
			options={options}
			allowClear
			{...props}
		/>
	)
}

export default PayTypeSelector
